The Java Workshop by David Cuartielles Andreas Göransson & Eric Foster-Johnson
Author:David Cuartielles, Andreas Göransson & Eric Foster-Johnson
Language: eng
Format: epub
Publisher: Packt Publishing Pvt. Ltd.
Published: 2019-09-05T16:00:00+00:00
Exercise 2: Creating an Immutable Class
A local furniture carpenter has set up shop on your street and has asked you to build the storage mechanism for a simple shopping cart application, which they will use internally for people ordering furniture. The application should be able to safely handle multiple people editing it at the same time from different threads. The salespeople will take orders on the phone and the carpenters will be editing the price in hours spent and material used. The shopping cart must be immutable! To do this, perform the following steps:
In the Project pane in IntelliJ, right-click on the folder named src.
Choose New -> Java Class in the menu and enter Exercise2.
Define the main method in your new class:package com.packt.java.chapter13;
public class Exercise2 {
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12593)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9804)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7773)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7568)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7192)
Microservices with Go by Alexander Shuiskov(6955)
Practical Design Patterns for Java Developers by Miroslav Wengner(6872)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6816)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6426)
Angular Projects - Third Edition by Aristeidis Bampakos(6235)
The Art of Crafting User Stories by The Art of Crafting User Stories(5750)
NetSuite for Consultants - Second Edition by Peter Ries(5676)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5492)
Kotlin in Action by Dmitry Jemerov(5076)
